
import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/dist/query/react";

//入库操作请求API
export const beginMonitorApi = createApi({
    reducerPath: 'beginMonitorApi',
    //设置基本请求路径
    baseQuery: fetchBaseQuery({
        baseUrl: window.app
    }),
    tagTypes:['beginMonitorApi'],//定义标签
    endpoints(build) {
        return {
          
            getbeginmonitorexcute: build.query({
                query:(data) =>({
                    url: 'FileWatch/BeginWatch',
                    method:'GET',
                    params:data,
                }),
                transformResponse(baseQuery){
                    return baseQuery;
                },
                
            }),


        }
    }
});


//导出钩子函数给外部使用，自动生成hooks的名称为`use(Endpoint_name)Query`
export const { useGetbeginmonitorexcuteQuery} = beginMonitorApi;